package AFTriangle;
import static org.junit.Assert.*;

import org.junit.Test;


public class AFTriangleProgramTest {

	@Test
	public void testIsEquilateral() {
		
		assertEquals(false, AFTriangleProgram.isEquilateralTriangle(1, 2, 3));
		assertEquals(true, AFTriangleProgram.isEquilateralTriangle(2, 2, 2));
		assertEquals(false, AFTriangleProgram.isEquilateralTriangle(-1, 2, 3));		
	}

	@Test
	public void testIsScalene() {
		
		assertEquals(true, AFTriangleProgram.isScaleneTriangle(1, 2, 3));
		assertEquals(false, AFTriangleProgram.isScaleneTriangle(2, 2, 2));
		assertEquals(false, AFTriangleProgram.isScaleneTriangle(-1, 2, 3));		
	}
	
	@Test
	public void testIsIsosceles() {
		
		assertEquals(false, AFTriangleProgram.isIsoscelesTriangle(1, 2, 3));
		assertEquals(true, AFTriangleProgram.isIsoscelesTriangle(1, 2, 1));
		assertEquals(false, AFTriangleProgram.isIsoscelesTriangle(2, 2, 2));
		assertEquals(false, AFTriangleProgram.isIsoscelesTriangle(-1, 2, 3));		
	}
	
	@Test
	public void testIsRight() {
		
		assertEquals(false, AFTriangleProgram.isRightTriangle(1, 2, 3));
		assertEquals(true, AFTriangleProgram.isRightTriangle(3, 4, 5));
		assertEquals(true, AFTriangleProgram.isRightTriangle(4, 5, 3));
		assertEquals(true, AFTriangleProgram.isRightTriangle(36, 48, 60));
		assertEquals(false, AFTriangleProgram.isRightTriangle(-1, 2, 3));
		assertEquals(false, AFTriangleProgram.isRightTriangle(3, 3, 3));	
	}
	
	@Test
	public void testSmallestSide() {
		assertEquals(1, AFTriangleProgram.smallestSide(1, 2, 3), 0);
		assertEquals(2, AFTriangleProgram.smallestSide(5, 2, 4), 0);
		assertEquals(3, AFTriangleProgram.smallestSide(6, 7, 3), 0);
	}
	
	@Test
	public void testMiddleSide() {
		assertEquals(2, AFTriangleProgram.middleSide(1, 2, 3), 0);
		assertEquals(1, AFTriangleProgram.middleSide(1, 1, 1), 0);
		assertEquals(3, AFTriangleProgram.middleSide(4, 2, 3), 0);
	}
	
	@Test
	public void testBiggestSide() {
		assertEquals(3, AFTriangleProgram.biggestSide(1, 2, 3), 0);
		assertEquals(2, AFTriangleProgram.biggestSide(1, 2, 1), 0);
		assertEquals(1, AFTriangleProgram.biggestSide(1, 1, 1), 0);
	}
	
}
